---
title: "<RedirectToSignUp />"
---

The `<RedirectToSignUp />` component ensures users are redirected to the sign-up page if they are not authenticated. If the user is signed in, it does nothing. It's useful for protected pages in your application, specifically when you want unauthenticated users to immediately register instead of logging in.

## Usage

```tsx
import { RedirectToSignUp, SignedIn } from "@daveyplate/better-auth-ui"

export default function ProtectedPage() {
  return (
    <>
      <RedirectToSignUp />

      <SignedIn>
        Welcome! You are signed in.
      </SignedIn>
    </div>
  )
}
```